import React from 'react';
import cn from 'classnames';
import styles from './style.less';

const ExtendController = ({ showExtendBtn, isExtended, ...props }) => (
    <div className={cn(styles.extendBox, showExtendBtn ? '' : styles.hide)} {...props}>
        {isExtended ? (
            <>
                收起 <div className={styles.triangleUp}></div>
            </>
        ) : (
            <>
                展开 <div className={styles.triangleDown}></div>
            </>
        )}
    </div>
);

export default ExtendController;
